<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/layout">
    <title layout:fragment="title">分销商账户管理</title>
<body>
<div class="main-content" layout:fragment="content">
    <div class="breadcrumbs" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="/admin/">系统管理</a>
            </li>
            <li class="active">添加角色</li>
        </ul>
    </div>
    <!-- .page-content -->
    <div class="page-content">
        <form method="post" th:action="@{/admin/role/edit_resource}" id="add_distributor_form"  class="form-horizontal">
            <div class="row">
                <h3 class="lighter block green" th:text="'角色信息：('+${role.roleName}+')'"></h3>
                <input style="display: none" name="roleId" th:value="${role.id}"/>
                <input name="platformId" th:value="${platformId}" style="display: none"/>
                <hr/>
                <div class="col-xs-10 col-xs-offset-1">
                    <div class="checkbox"  >
                        <label th:each=" r: ${list}">
                            <input name="resourceIds" th:value="${r.resourceId}" type="checkbox" th:checked="${r.isChosen}" class="ace"/>
                            <span class="lbl" th:text="${r.resourceName}"> choice 1</span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="modal-footer center">
                <a class="btn btn-success btn-sm" id="add_btn">
                    <i class="icon-save"></i>
                    添加
                </a>

                <a class="btn btn-grey btn-sm" id="back_btn">
                    <i class="icon-backward"></i>
                    返回
                </a>
            </div>
        </form>

    </div>
</div>
<script layout:fragment="script" th:src="@{/assets/js/role/add.js}"></script>
</body>
</html>